# -*- coding: utf-8 -*-
"""
author:码同学 极光
date:2023-06-07
desc: 
sample: 
"""


# 函数  动态语法
def fun1(a1=10):
    print(type(a1), a1)


def fun2(a1, a2):
    print(type(a1), type(a2), a1, a2)


def fun3(a1, *args):
    print(type(a1), type(args), a1, args)

def fun4(a1,**args):
    print(type(a1), type(args), a1, args)

def fun5(*arg1,**arg2):
    print(type(arg1), type(arg2), arg1, arg2)

#python 仿强类型语法
def fun6(name:str,age:int)->str:
    if isinstance(age, int):
       age = age+1
    print(type(name),type(age),name,age)
    return "1111",'121212'

func7 = lambda a1,a2 : a1 + a2

if __name__ == '__main__':
  print(fun1())
  fun1('1')
  fun1(1)
  fun1({"abc","abc"})
  fun1(["abc","abc"])
  fun2(1,2)
  fun2(a2='111',a1=["abc","abc"])
  fun2(1,2)

  # fun3(1,2)
  # fun3(1, 2,3,4)
  # fun3(1, (2, 3, 4))
  # info = {
  #     "age": 18,
  #     "status": True,
  #     "name": "极光"
  # }
  # fun3("11",info)



  # fun4("11")
  # fun4("11",x=2)
  # fun4("11", x=2,y=2)
  # fun4("11",**info)


  # for i in range(10):
  #     print(i,end="_")
  # fun5(a1=11, a2=3)
  # fun5(11, a2=3)
  # fun5(["1","2"], a2=3)

  # fun6("zhangsan1",20)
  # fun6("zhangsan2", '20')
  # result = fun6("zhangsan3", ["1","2"])
  # print("---------")
  # print(type(result),result)

  print(func7(1, 2))


